﻿using Bigway.Common.Models.DbModels;

namespace Bigway.Common.Services.Repositories;

public class CrmebMerchantRepository(IServiceProvider sp) :
    BaseCrmebRepository<CrmebMerchant>(sp),
    ICrmebMerchantRepository
{
    public async Task<bool> ExistsAsync(int merchantId, CancellationToken token = default)
    {
        return await Queryable
            .AnyAsync(x => x.Id == merchantId && x.IsDeleted == 0, token);
    }
}